# Migration template created by DBMigrate at 2008/07/22 07:8.2d:11 UTC.
 
from dbmigrate.migration import *

migrations = {   'mysql': [   CreateDatabase(),
                 (   'CREATE TABLE %(db)s.%(schema_table)s (\n            %(id_col)s INTEGER PRIMARY KEY AUTO_INCREMENT,\n            %(migration_package_col)s VARCHAR(128) NOT NULL,\n            %(schema_revision_col)s BIGINT UNSIGNED NOT NULL\n    )\n',
                     'DROP TABLE %(db)s.%(schema_table)s')],
    'sqlite': [   (   'CREATE TABLE %(schema_table)s (\n        %(id_col)s INTEGER PRIMARY KEY AUTOINCREMENT,\n        %(migration_package_col)s VARCHAR(128) NOT NULL,\n        %(schema_revision_col)s INTEGER UNSIGNED NOT NULL\n    )\n',
                      'DROP TABLE %(schema_table)s')],
                      'postgres': [
CreateDatabase(), (
"""CREATE SEQUENCE %(schema_table)s_seq""",
"""DROP SEQUENCE %(schema_table)s_seq"""
    ), (
"""CREATE TABLE %(schema_table)s (
            %(id_col)s INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('%(schema_table)s_seq'), 
            %(migration_package_col)s VARCHAR(128) NOT NULL,
            %(schema_revision_col)s BIGINT NOT NULL
    )
""", 
"""DROP TABLE %(schema_table)s"""
    ),
]}
